﻿package com.sz.message.bmo.impl;

import java.util.List;
import java.util.Map;

import com.sz.manager.dao.IManagerDAO;
import com.sz.message.bmo.IMessageBMO;
import com.sz.message.dao.IMessageDAO;

public class MessageBMO implements IMessageBMO {
	
	protected IMessageDAO	messageDAO = null;

	public IMessageDAO getMessageDAO() {
		return messageDAO;
	}

	public void setMessageDAO(IMessageDAO messageDAO) {
		this.messageDAO = messageDAO;
	}
	
	@SuppressWarnings("unchecked")
	public long addMessage(Map map) throws Exception {
		return messageDAO.addMessage(map);
	}
	
	@SuppressWarnings("unchecked")
	public long sendMessage(String phoneNum, String msg) throws Exception {
		return messageDAO.sendMessage(phoneNum, msg);
	}
	
	/**
	 * 和订单有关的短信
	 */	
	public String getSMS_Ticket(String ticket_id, String type) throws Exception {
		return messageDAO.getSMS_Ticket(ticket_id, type);
	}
	
	/**
	 * 商家短信（如商家优惠）
	 * @param business_id
	 * @return
	 * @throws Exception
	 */
	public String getSMS_Business(String business_id, String type) throws Exception {
		return messageDAO.getSMS_Business(business_id, type);
	}
}
